home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / qw12add.arc / EXCEPT13.TEC < prev    next >
Text File  |  1990-12-19  |  8KB  |  154 lines

  1. ID:13 Exception #12 and #13 and QEMM 
  2. Quarterdeck Technical Note 
  3. by Bob Perry and Dan Sallitt
  4.  
  5. Q: What is an "Exception #12"?  What is an "Exception #13"?                            
  6.  
  7. Q: What can be done to prevent Exception #12's and #13's?
  8.  
  9.      Exceptions are unusual or invalid conditions associated with 
  10. the execution of a particular instruction by the 80386 processor 
  11. (or higher processors).  The 80386 recognizes several different 
  12. classes of exceptions, and assigns a different vector number to 
  13. each class. The DESQview-386 memory manager, QEMM-386, has been 
  14. designed to capture these 80386 exception vectors and display 
  15. them directly to the user.
  16.  
  17.     Exception #13 is the "General Protection Fault" error.  Any 
  18. privileged instruction or any instruction that references memory 
  19. can trigger an Exception #13.  It is the most commonly 
  20. encountered 80386 fault.
  21.  
  22.     The two circumstances that can cause an Exception #13 to 
  23. occur require very different troubleshooting approaches.  In the 
  24. first case, privileged instructions, the Exception #13 could 
  25. indicate that a program has violated the protected mode of the 
  26. 80386 by executing a privileged instruction or I/O reference. 
  27. Thus, when the prompt "Terminate, Reboot or Continue?" is issued, 
  28. the "Continue" option puts the system back into real mode, and 
  29. the program should continue to execute. (After choosing the 
  30. "Continue" option, one should not necessarily assume that the 
  31. system is stable.  A reboot at the earliest convenient time is 
  32. probably wise.)
  33.  
  34.      It is the second case, instructions that reference memory, 
  35. that is far more common to DESQview 386 (and QEMM-386) users.  
  36. Here the exception may indicate that an application has a bug, or 
  37. that adverse circumstances have sent it out of control.  It has 
  38. overwritten its memory partition, and may in fact be running 
  39. wild, writing code all over the place.  This situation can occur 
  40. with some programs that were written for use on the 8088 
  41. processor and may not be usable in the 80386's virtual 8086 mode.  
  42. A few other programs may not be compatible with QEMM-386.  In 
  43. some cases the problem occurs even without QEMM present (in which 
  44. case it manifests itself as a crash instead of an an error 
  45. message).  What this usually adds up to is that when "Terminate, 
  46. Reboot or Continue" is displayed, the user can usually only 
  47. "Terminate."
  48.  
  49.      For those users who are more technically oriented, this over-
  50. writing of the memory partition generally means that a word or a 
  51. double word value of code has been written to the last byte of a 
  52. segment.  The problem or "bug" in the application program or in 
  53. the system shows up as an attempt to wrap the value to the next 
  54. segment of memory.
  55.  
  56.      What can the user do to prevent Exception #13's?   Because a 
  57. great many problems can result in Exception #13's, it is 
  58. sometimes necessary to resort to general troubleshooting 
  59. techniques.  The DESQview 386 user should start with two simple 
  60. steps: first, run Change a Program and try to allocate more 
  61. memory to the application.  Second, the user can try to increase 
  62. the protection level of the afflicted window to 3, which will not 
  63. remove the source of the Exception #13, but may pass more 
  64. descriptive error messages through to the user.  
  65.  
  66.      When Exception #13's are obtained outside of DESQview they 
  67. are either caused by applications written for the 80386 protected 
  68. mode or they are not.  If the faulting application is written for 
  69. the protected mode of the 80386, it is likely that this program 
  70. has no VCPI (Virtual Control Program Interface) support.  Since 
  71. QEMM-386 is a protected mode program, such faulting applications 
  72. cannot be run under QEMM without VCPI.  The user has no choice 
  73. but to reboot without QEMM, and contact the developer of the 
  74. faulting application to request VCPI support.
  75.  
  76.      If the faulting application was not written for the 
  77. protected mode of the 80386, a good possibility is that the QEMM 
  78. user has installed QEMM with the RAM parameter (which is 
  79. necessary to LOADHI drivers and TSR's).  In this case the 
  80. faulting program may be running in an area of high RAM that 
  81. contains a memory conflict.  To correct this problem, the user 
  82. may opt to RAM only specific areas of memory, as described on 
  83. page 6 of the QEMM-386 manual, rather than to RAM all mappable 
  84. areas.  Of course, an area of conflict that is not RAMmed is 
  85. still an area of conflict, and may cause problems if another 
  86. application tries to map expanded memory into that region.  A 
  87. better solution to such memory conflicts might be to use the 
  88. EXCLUDE parameter (described on page 5 of the QEMM manual) on the 
  89. area in conflict.  
  90.  
  91.      When in doubt about which areas to exclude, the user may 
  92. wish to pay special attention to areas that are marked "Rammable" 
  93. on the QEMM.COM Type screen, or to High RAM areas in the F000-
  94. FFFF area.  "Rammable" areas are usually adjacent to ROM areas, 
  95. and the possiblilty exists that the ROM is slightly bigger than 
  96. QEMM could detect and is spilling over into the "Rammable" area.  
  97. High RAM areas in the F000-FFFF region are mapped over pieces of 
  98. the system ROM that either QEMM or the user have judged not to be 
  99. in use.  Obviously, this judgment should be questioned when 
  100. Exception #13 messages occur.  The F000-FFFF area should be 
  101. scrutinized especially carefully when floppy disk access 
  102. generates the exception error. 
  103.  
  104.      The QEMM.COM Accessed screen (also available as the Manifest 
  105. QEMM-386\Accessed screen) can give the user valuable hints about 
  106. what areas of memory are in use.  To use the Accessed screen, 
  107. replace the RAM parameter on the QEMM line in the CONFIG.SYS file 
  108. with the ON parameter and reboot the machine.  Any area that the 
  109. Accessed screen then shows as having been touched, but that the 
  110. Type screen shows as Mappable or Rammable, is a good candidate 
  111. for exclusion.  If the Exception #13 error only occurs with the 
  112. RAM parameter present, you can now safely perform the action that 
  113. usually generates the error, then consult the Accessed screen to 
  114. see what areas of memory have been newly touched. 
  115.  
  116.     Some pieces of hardware can come into conflict with QEMM or 
  117. DESQview and generate Exception #13 errors.  The most frequent 
  118. offenders are bus-mastering devices (hard disk controllers, 
  119. network cards, CD-ROM controllers, etc.) and autoswitching video 
  120. cards.  Bus-mastering hard disk controllers often cause Exception 
  121. #13 errors upon any use of the LOADHI programs, for instance.  
  122. For approaches to this problem, see the Quarterdeck Technical 
  123. Note titled "Bus-Mastering Devices and QEMM-386."  Not all 
  124. autoswitching video cards come into conflict with QEMM or other 
  125. pieces of software.  When a conflict occurs, however, it does not 
  126. always take the form of a video problem, and sometimes results in 
  127. the Exception #13 message.  Disabling autoswitching is the only 
  128. solution to such a problem.
  129.  
  130.     General troubleshooting methods, like temporarily removing 
  131. all TSR's, device drivers and questionable QEMM parameters, often 
  132. provide valuable information about the exception error.  It 
  133. sometimes happens that a circumstance that generates an Exception 
  134. #13 with QEMM present simply causes the machine to crash without 
  135. any message when QEMM is removed.  In such a case, QEMM is simply 
  136. the bearer of bad news.
  137.  
  138.     Exception #12 is the "Stack Segment" fault.  The stack 
  139. segment fault occurs when the processor detects certain problems 
  140. with the segment addressed by the SS segment register.  This 
  141. exception too can be the result either of a bug in a program or 
  142. of some system malfunction that eventually results in a stack 
  143. error. All of the above methods of troubleshooting Exception #13 
  144. messages should also be used when trying to track down the cause 
  145. of an Exception #12.  The one difference that should be kept in 
  146. mind is that Exception #12 messages are not generated by an 
  147. application simply going into protected mode, executing 
  148. privileged instructions, or accessing privileged registers.  
  149. Therefore you need not consider the possibility that the 
  150. application needs to incorporate VCPI support to run with QEMM.
  151.  
  152.         Copyright (C) 1990 by Quarterdeck Office Systems
  153.              * * *   E N D   O F   F I L E    * * * 
  154.